package com.gigi.model.enums;

/**
 * 异常枚举
 */
public enum ErrorCodeEnum {
    NO_DATA("201", "未查询到数据"),
    SAVE_FAILED("202", "新增失败"),
    EDIT_FAILED("203", "更新失败"),
    DELETE_FAILED("204", "删除失败"),

    BIZ_EXCEPTION("500", "内部异常"),
    PARAM_ERROR("400", "参数错误"),
    ACCESS_DENIED("600", "无权访问"),
    NOT_LOGIN("700", "未登录"),
    PARAM_NOT_MATCH("800", "参数不符合要求"),

    FILE_EMPTY("2001", "上传文件不能为空"),
    UPLOAD_FILE_FAILED("2002", "上传文件失败"),

    ACCOUNT_NOT_STRONG("4000", "账号格式必须不能使用特殊字符，长度不能少于6位"),
    PWD_NOT_SAME("4001", "两次输入的密码不一致"),
    PWD_NOT_STRONG("4002", "密码格式必须包含大小写字母和数字的组合，不能使用特殊字符，长度在8-10之间"),
    ALREADY_REGISTER("4003", "该账号已存在用户"),


    ACCOUNT_NOT_EXIST("4004", "用户不存在，请检查账号密码是否正确"),
    SAVE_SESSION_FAILED("4005", "登录态记录失败"),

    TEAM_LIMIT_EXCEEDED("5001", "最多只能创建5个队伍"),
    CANNOT_JOIN_SELF_TEAM("5002", "不能加入自己的队伍"),
    TEAM_EXPIRED("5003","队伍已过期"),
    PASSWORD_ERROR("5004", "密码错误"),
    ALREADY_JOINED("5005", "已经加入该队伍"),
    TEAM_FULL("5006", "队伍人数已满"),
    JOIN_TEAM_LIMIT_EXCEEDED("5007","最多只能加入5个队伍（包含自己创建的）"),

    OLD_PASSWORD_ERROR("5008", "旧密码错误"),


    ;

    private final String errCode;
    private final String errDesc;

    ErrorCodeEnum(String errCode, String errDesc) {
        this.errCode = errCode;
        this.errDesc = errDesc;
    }

    public String getErrCode() {
        return errCode;
    }

    public String getErrDesc() {
        return errDesc;
    }
}
